package org.util.test;

import java.util.UUID;

import org.junit.Test;
import org.util.mqttclient.ReceivedCallback;
import org.util.mqttclient.MqttTopicListener;

public class AnotherMQTT {
	@Test
	public void test() throws InterruptedException{
		MqttTopicListener topicListener02 = new MqttTopicListener("tcp://192.168.1.110:61613", "admin", "password", "6132E72DFCA2415FB6FE8934C665DBBB","1213");
		topicListener02.start(new ReceivedCallback() {
			
			@Override
			public void receivedHandler(String message) {
				System.out.println("get message:"+message);
				
			}
		});
		synchronized (AnotherMQTT.class) {
			while(true){
				AnotherMQTT.class.wait();
			}
		}
	}

}
